<?php
if (session_id() == "") session_start(); // Initialize Session data
ob_start(); // Turn on output buffering
?>
<?php include_once "ewcfg10.php" ?>
<?php include_once "ewmysql10.php" ?>
<?php include_once "phpfn10.php" ?>
<?php include_once "noticiasinfo.php" ?>
<?php include_once "usuariosinfo.php" ?>
<?php include_once "userfn10.php" ?>
<?php

//
// Page class
//

$noticias_view = NULL; // Initialize page object first

class cnoticias_view extends cnoticias {

	// Page ID
	var $PageID = 'view';

	// Project ID
	var $ProjectID = "{BF52BDE3-CE95-4CBB-AAA5-8634D9553193}";

	// Table name
	var $TableName = 'noticias';

	// Page object name
	var $PageObjName = 'noticias_view';

	// Page name
	function PageName() {
		return ew_CurrentPage();
	}

	// Page URL
	function PageUrl() {
		$PageUrl = ew_CurrentPage() . "?";
		if ($this->UseTokenInUrl) $PageUrl .= "t=" . $this->TableVar . "&"; // Add page token
		return $PageUrl;
	}

	// Page URLs
	var $AddUrl;
	var $EditUrl;
	var $CopyUrl;
	var $DeleteUrl;
	var $ViewUrl;
	var $ListUrl;

	// Export URLs
	var $ExportPrintUrl;
	var $ExportHtmlUrl;
	var $ExportExcelUrl;
	var $ExportWordUrl;
	var $ExportXmlUrl;
	var $ExportCsvUrl;
	var $ExportPdfUrl;

	// Update URLs
	var $InlineAddUrl;
	var $InlineCopyUrl;
	var $InlineEditUrl;
	var $GridAddUrl;
	var $GridEditUrl;
	var $MultiDeleteUrl;
	var $MultiUpdateUrl;

	// Message
	function getMessage() {
		return @$_SESSION[EW_SESSION_MESSAGE];
	}

	function setMessage($v) {
		ew_AddMessage($_SESSION[EW_SESSION_MESSAGE], $v);
	}

	function getFailureMessage() {
		return @$_SESSION[EW_SESSION_FAILURE_MESSAGE];
	}

	function setFailureMessage($v) {
		ew_AddMessage($_SESSION[EW_SESSION_FAILURE_MESSAGE], $v);
	}

	function getSuccessMessage() {
		return @$_SESSION[EW_SESSION_SUCCESS_MESSAGE];
	}

	function setSuccessMessage($v) {
		ew_AddMessage($_SESSION[EW_SESSION_SUCCESS_MESSAGE], $v);
	}

	function getWarningMessage() {
		return @$_SESSION[EW_SESSION_WARNING_MESSAGE];
	}

	function setWarningMessage($v) {
		ew_AddMessage($_SESSION[EW_SESSION_WARNING_MESSAGE], $v);
	}

	// Show message
	function ShowMessage() {
		$hidden = FALSE;
		$html = "";

		// Message
		$sMessage = $this->getMessage();
		$this->Message_Showing($sMessage, "");
		if ($sMessage <> "") { // Message in Session, display
			if (!$hidden)
				$sMessage = "<button type=\"button\" class=\"close\" data-dismiss=\"alert\">&times;</button>" . $sMessage;
			$html .= "<div class=\"alert alert-success ewSuccess\">" . $sMessage . "</div>";
			$_SESSION[EW_SESSION_MESSAGE] = ""; // Clear message in Session
		}

		// Warning message
		$sWarningMessage = $this->getWarningMessage();
		$this->Message_Showing($sWarningMessage, "warning");
		if ($sWarningMessage <> "") { // Message in Session, display
			if (!$hidden)
				$sWarningMessage = "<button type=\"button\" class=\"close\" data-dismiss=\"alert\">&times;</button>" . $sWarningMessage;
			$html .= "<div class=\"alert alert-warning ewWarning\">" . $sWarningMessage . "</div>";
			$_SESSION[EW_SESSION_WARNING_MESSAGE] = ""; // Clear message in Session
		}

		// Success message
		$sSuccessMessage = $this->getSuccessMessage();
		$this->Message_Showing($sSuccessMessage, "success");
		if ($sSuccessMessage <> "") { // Message in Session, display
			if (!$hidden)
				$sSuccessMessage = "<button type=\"button\" class=\"close\" data-dismiss=\"alert\">&times;</button>" . $sSuccessMessage;
			$html .= "<div class=\"alert alert-success ewSuccess\">" . $sSuccessMessage . "</div>";
			$_SESSION[EW_SESSION_SUCCESS_MESSAGE] = ""; // Clear message in Session
		}

		// Failure message
		$sErrorMessage = $this->getFailureMessage();
		$this->Message_Showing($sErrorMessage, "failure");
		if ($sErrorMessage <> "") { // Message in Session, display
			if (!$hidden)
				$sErrorMessage = "<button type=\"button\" class=\"close\" data-dismiss=\"alert\">&times;</button>" . $sErrorMessage;
			$html .= "<div class=\"alert alert-error ewError\">" . $sErrorMessage . "</div>";
			$_SESSION[EW_SESSION_FAILURE_MESSAGE] = ""; // Clear message in Session
		}
		echo "<table class=\"ewStdTable\"><tr><td><div class=\"ewMessageDialog\"" . (($hidden) ? " style=\"display: none;\"" : "") . ">" . $html . "</div></td></tr></table>";
	}
	var $PageHeader;
	var $PageFooter;

	// Show Page Header
	function ShowPageHeader() {
		$sHeader = $this->PageHeader;
		$this->Page_DataRendering($sHeader);
		if ($sHeader <> "") { // Header exists, display
			echo "<p>" . $sHeader . "</p>";
		}
	}

	// Show Page Footer
	function ShowPageFooter() {
		$sFooter = $this->PageFooter;
		$this->Page_DataRendered($sFooter);
		if ($sFooter <> "") { // Footer exists, display
			echo "<p>" . $sFooter . "</p>";
		}
	}

	// Validate page request
	function IsPageRequest() {
		global $objForm;
		if ($this->UseTokenInUrl) {
			if ($objForm)
				return ($this->TableVar == $objForm->GetValue("t"));
			if (@$_GET["t"] <> "")
				return ($this->TableVar == $_GET["t"]);
		} else {
			return TRUE;
		}
	}

	//
	// Page class constructor
	//
	function __construct() {
		global $conn, $Language;
		$GLOBALS["Page"] = &$this;

		// Language object
		if (!isset($Language)) $Language = new cLanguage();

		// Parent constuctor
		parent::__construct();

		// Table object (noticias)
		if (!isset($GLOBALS["noticias"]) || get_class($GLOBALS["noticias"]) == "cnoticias") {
			$GLOBALS["noticias"] = &$this;
			$GLOBALS["Table"] = &$GLOBALS["noticias"];
		}
		$KeyUrl = "";
		if (@$_GET["not_id"] <> "") {
			$this->RecKey["not_id"] = $_GET["not_id"];
			$KeyUrl .= "&amp;not_id=" . urlencode($this->RecKey["not_id"]);
		}
		$this->ExportPrintUrl = $this->PageUrl() . "export=print" . $KeyUrl;
		$this->ExportHtmlUrl = $this->PageUrl() . "export=html" . $KeyUrl;
		$this->ExportExcelUrl = $this->PageUrl() . "export=excel" . $KeyUrl;
		$this->ExportWordUrl = $this->PageUrl() . "export=word" . $KeyUrl;
		$this->ExportXmlUrl = $this->PageUrl() . "export=xml" . $KeyUrl;
		$this->ExportCsvUrl = $this->PageUrl() . "export=csv" . $KeyUrl;
		$this->ExportPdfUrl = $this->PageUrl() . "export=pdf" . $KeyUrl;

		// Table object (usuarios)
		if (!isset($GLOBALS['usuarios'])) $GLOBALS['usuarios'] = new cusuarios();

		// Page ID
		if (!defined("EW_PAGE_ID"))
			define("EW_PAGE_ID", 'view', TRUE);

		// Table name (for backward compatibility)
		if (!defined("EW_TABLE_NAME"))
			define("EW_TABLE_NAME", 'noticias', TRUE);

		// Start timer
		if (!isset($GLOBALS["gTimer"])) $GLOBALS["gTimer"] = new cTimer();

		// Open connection
		if (!isset($conn)) $conn = ew_Connect();

		// Export options
		$this->ExportOptions = new cListOptions();
		$this->ExportOptions->Tag = "div";
		$this->ExportOptions->TagClassName = "ewExportOption";

		// Other options
		$this->OtherOptions['action'] = new cListOptions();
		$this->OtherOptions['action']->Tag = "div";
		$this->OtherOptions['action']->TagClassName = "ewActionOption";
		$this->OtherOptions['detail'] = new cListOptions();
		$this->OtherOptions['detail']->Tag = "div";
		$this->OtherOptions['detail']->TagClassName = "ewDetailOption";
	}

	// 
	//  Page_Init
	//
	function Page_Init() {
		global $gsExport, $gsExportFile, $UserProfile, $Language, $Security, $objForm;

		// Security
		$Security = new cAdvancedSecurity();
		if (!$Security->IsLoggedIn()) $Security->AutoLogin();
		if (!$Security->IsLoggedIn()) {
			$Security->SaveLastUrl();
			$this->Page_Terminate("login.php");
		}
		$Security->TablePermission_Loading();
		$Security->LoadCurrentUserLevel($this->ProjectID . $this->TableName);
		$Security->TablePermission_Loaded();
		if (!$Security->IsLoggedIn()) {
			$Security->SaveLastUrl();
			$this->Page_Terminate("login.php");
		}
		if (!$Security->CanView()) {
			$Security->SaveLastUrl();
			$this->setFailureMessage($Language->Phrase("NoPermission")); // Set no permission
			$this->Page_Terminate("noticiaslist.php");
		}
		$this->CurrentAction = (@$_GET["a"] <> "") ? $_GET["a"] : @$_POST["a_list"]; // Set up curent action
		$this->not_id->Visible = !$this->IsAdd() && !$this->IsCopy() && !$this->IsGridAdd();

		// Global Page Loading event (in userfn*.php)
		Page_Loading();

		// Page Load event
		$this->Page_Load();
	}

	//
	// Page_Terminate
	//
	function Page_Terminate($url = "") {
		global $conn;

		// Page Unload event
		$this->Page_Unload();

		// Global Page Unloaded event (in userfn*.php)
		Page_Unloaded();
		$this->Page_Redirecting($url);

		 // Close connection
		$conn->Close();

		// Go to URL if specified
		if ($url <> "") {
			if (!EW_DEBUG_ENABLED && ob_get_length())
				ob_end_clean();
			header("Location: " . $url);
		}
		exit();
	}
	var $ExportOptions; // Export options
	var $OtherOptions = array(); // Other options
	var $DisplayRecs = 1;
	var $StartRec;
	var $StopRec;
	var $TotalRecs = 0;
	var $RecRange = 10;
	var $RecCnt;
	var $RecKey = array();
	var $Recordset;

	//
	// Page main
	//
	function Page_Main() {
		global $Language;

		// Load current record
		$bLoadCurrentRecord = FALSE;
		$sReturnUrl = "";
		$bMatchRecord = FALSE;

		// Set up Breadcrumb
		$this->SetupBreadcrumb();
		if ($this->IsPageRequest()) { // Validate request
			if (@$_GET["not_id"] <> "") {
				$this->not_id->setQueryStringValue($_GET["not_id"]);
				$this->RecKey["not_id"] = $this->not_id->QueryStringValue;
			} else {
				$sReturnUrl = "noticiaslist.php"; // Return to list
			}

			// Get action
			$this->CurrentAction = "I"; // Display form
			switch ($this->CurrentAction) {
				case "I": // Get a record to display
					if (!$this->LoadRow()) { // Load record based on key
						if ($this->getSuccessMessage() == "" && $this->getFailureMessage() == "")
							$this->setFailureMessage($Language->Phrase("NoRecord")); // Set no record message
						$sReturnUrl = "noticiaslist.php"; // No matching record, return to list
					}
			}
		} else {
			$sReturnUrl = "noticiaslist.php"; // Not page request, return to list
		}
		if ($sReturnUrl <> "")
			$this->Page_Terminate($sReturnUrl);

		// Render row
		$this->RowType = EW_ROWTYPE_VIEW;
		$this->ResetAttrs();
		$this->RenderRow();
	}

	// Set up other options
	function SetupOtherOptions() {
		global $Language, $Security;
		$options = &$this->OtherOptions;
		$option = &$options["action"];

		// Add
		$item = &$option->Add("add");
		$item->Body = "<a class=\"ewAction ewAdd\" href=\"" . ew_HtmlEncode($this->AddUrl) . "\">" . $Language->Phrase("ViewPageAddLink") . "</a>";
		$item->Visible = ($this->AddUrl <> "" && $Security->CanAdd());

		// Edit
		$item = &$option->Add("edit");
		$item->Body = "<a class=\"ewAction ewEdit\" href=\"" . ew_HtmlEncode($this->EditUrl) . "\">" . $Language->Phrase("ViewPageEditLink") . "</a>";
		$item->Visible = ($this->EditUrl <> "" && $Security->CanEdit());

		// Copy
		$item = &$option->Add("copy");
		$item->Body = "<a class=\"ewAction ewCopy\" href=\"" . ew_HtmlEncode($this->CopyUrl) . "\">" . $Language->Phrase("ViewPageCopyLink") . "</a>";
		$item->Visible = ($this->CopyUrl <> "" && $Security->CanAdd());

		// Delete
		$item = &$option->Add("delete");
		$item->Body = "<a class=\"ewAction ewDelete\" href=\"" . ew_HtmlEncode($this->DeleteUrl) . "\">" . $Language->Phrase("ViewPageDeleteLink") . "</a>";
		$item->Visible = ($this->DeleteUrl <> "" && $Security->CanDelete());

		// Set up options default
		foreach ($options as &$option) {
			$option->UseDropDownButton = FALSE;
			$option->UseButtonGroup = TRUE;
			$item = &$option->Add($option->GroupOptionName);
			$item->Body = "";
			$item->Visible = FALSE;
		}
		$options["detail"]->DropDownButtonPhrase = $Language->Phrase("ButtonDetails");
		$options["action"]->DropDownButtonPhrase = $Language->Phrase("ButtonActions");
	}

	// Set up starting record parameters
	function SetUpStartRec() {
		if ($this->DisplayRecs == 0)
			return;
		if ($this->IsPageRequest()) { // Validate request
			if (@$_GET[EW_TABLE_START_REC] <> "") { // Check for "start" parameter
				$this->StartRec = $_GET[EW_TABLE_START_REC];
				$this->setStartRecordNumber($this->StartRec);
			} elseif (@$_GET[EW_TABLE_PAGE_NO] <> "") {
				$PageNo = $_GET[EW_TABLE_PAGE_NO];
				if (is_numeric($PageNo)) {
					$this->StartRec = ($PageNo-1)*$this->DisplayRecs+1;
					if ($this->StartRec <= 0) {
						$this->StartRec = 1;
					} elseif ($this->StartRec >= intval(($this->TotalRecs-1)/$this->DisplayRecs)*$this->DisplayRecs+1) {
						$this->StartRec = intval(($this->TotalRecs-1)/$this->DisplayRecs)*$this->DisplayRecs+1;
					}
					$this->setStartRecordNumber($this->StartRec);
				}
			}
		}
		$this->StartRec = $this->getStartRecordNumber();

		// Check if correct start record counter
		if (!is_numeric($this->StartRec) || $this->StartRec == "") { // Avoid invalid start record counter
			$this->StartRec = 1; // Reset start record counter
			$this->setStartRecordNumber($this->StartRec);
		} elseif (intval($this->StartRec) > intval($this->TotalRecs)) { // Avoid starting record > total records
			$this->StartRec = intval(($this->TotalRecs-1)/$this->DisplayRecs)*$this->DisplayRecs+1; // Point to last page first record
			$this->setStartRecordNumber($this->StartRec);
		} elseif (($this->StartRec-1) % $this->DisplayRecs <> 0) {
			$this->StartRec = intval(($this->StartRec-1)/$this->DisplayRecs)*$this->DisplayRecs+1; // Point to page boundary
			$this->setStartRecordNumber($this->StartRec);
		}
	}

	// Load row based on key values
	function LoadRow() {
		global $conn, $Security, $Language;
		$sFilter = $this->KeyFilter();

		// Call Row Selecting event
		$this->Row_Selecting($sFilter);

		// Load SQL based on filter
		$this->CurrentFilter = $sFilter;
		$sSql = $this->SQL();
		$res = FALSE;
		$rs = ew_LoadRecordset($sSql);
		if ($rs && !$rs->EOF) {
			$res = TRUE;
			$this->LoadRowValues($rs); // Load row values
			$rs->Close();
		}
		return $res;
	}

	// Load row values from recordset
	function LoadRowValues(&$rs) {
		global $conn;
		if (!$rs || $rs->EOF) return;

		// Call Row Selected event
		$row = &$rs->fields;
		$this->Row_Selected($row);
		$this->not_id->setDbValue($rs->fields('not_id'));
		$this->not_fecha->setDbValue($rs->fields('not_fecha'));
		$this->not_hora->setDbValue($rs->fields('not_hora'));
		$this->not_seccion->setDbValue($rs->fields('not_seccion'));
		$this->not_orden->setDbValue($rs->fields('not_orden'));
		$this->not_copete->setDbValue($rs->fields('not_copete'));
		$this->not_titulo->setDbValue($rs->fields('not_titulo'));
		$this->not_resumens->setDbValue($rs->fields('not_resumens'));
		$this->not_contenido->setDbValue($rs->fields('not_contenido'));
		$this->not_imagen->Upload->DbValue = $rs->fields('not_imagen');
		$this->not_imagen->CurrentValue = $this->not_imagen->Upload->DbValue;
		$this->not_epi->setDbValue($rs->fields('not_epi'));
		$this->not_audio->Upload->DbValue = $rs->fields('not_audio');
		$this->not_audio->CurrentValue = $this->not_audio->Upload->DbValue;
		$this->not_url->setDbValue($rs->fields('not_url'));
		$this->not_publicar->setDbValue($rs->fields('not_publicar'));
		$this->not_fuente1->setDbValue($rs->fields('not_fuente1'));
		$this->not_fuente->setDbValue($rs->fields('not_fuente'));
		$this->not_galeria->setDbValue($rs->fields('not_galeria'));
		$this->not_destacada->setDbValue($rs->fields('not_destacada'));
		$this->not_visitas->setDbValue($rs->fields('not_visitas'));
		$this->not_publicar_index->setDbValue($rs->fields('not_publicar_index'));
		$this->not_autor->setDbValue($rs->fields('not_autor'));
		$this->not_usuario->setDbValue($rs->fields('not_usuario'));
	}

	// Load DbValue from recordset
	function LoadDbValues(&$rs) {
		if (!$rs || !is_array($rs) && $rs->EOF) return;
		$row = is_array($rs) ? $rs : $rs->fields;
		$this->not_id->DbValue = $row['not_id'];
		$this->not_fecha->DbValue = $row['not_fecha'];
		$this->not_hora->DbValue = $row['not_hora'];
		$this->not_seccion->DbValue = $row['not_seccion'];
		$this->not_orden->DbValue = $row['not_orden'];
		$this->not_copete->DbValue = $row['not_copete'];
		$this->not_titulo->DbValue = $row['not_titulo'];
		$this->not_resumens->DbValue = $row['not_resumens'];
		$this->not_contenido->DbValue = $row['not_contenido'];
		$this->not_imagen->Upload->DbValue = $row['not_imagen'];
		$this->not_epi->DbValue = $row['not_epi'];
		$this->not_audio->Upload->DbValue = $row['not_audio'];
		$this->not_url->DbValue = $row['not_url'];
		$this->not_publicar->DbValue = $row['not_publicar'];
		$this->not_fuente1->DbValue = $row['not_fuente1'];
		$this->not_fuente->DbValue = $row['not_fuente'];
		$this->not_galeria->DbValue = $row['not_galeria'];
		$this->not_destacada->DbValue = $row['not_destacada'];
		$this->not_visitas->DbValue = $row['not_visitas'];
		$this->not_publicar_index->DbValue = $row['not_publicar_index'];
		$this->not_autor->DbValue = $row['not_autor'];
		$this->not_usuario->DbValue = $row['not_usuario'];
	}

	// Render row values based on field settings
	function RenderRow() {
		global $conn, $Security, $Language;
		global $gsLanguage;

		// Initialize URLs
		$this->AddUrl = $this->GetAddUrl();
		$this->EditUrl = $this->GetEditUrl();
		$this->CopyUrl = $this->GetCopyUrl();
		$this->DeleteUrl = $this->GetDeleteUrl();
		$this->ListUrl = $this->GetListUrl();
		$this->SetupOtherOptions();

		// Call Row_Rendering event
		$this->Row_Rendering();

		// Common render codes for all row types
		// not_id
		// not_fecha
		// not_hora
		// not_seccion
		// not_orden
		// not_copete
		// not_titulo
		// not_resumens
		// not_contenido
		// not_imagen
		// not_epi
		// not_audio
		// not_url
		// not_publicar
		// not_fuente1
		// not_fuente
		// not_galeria
		// not_destacada
		// not_visitas
		// not_publicar_index
		// not_autor
		// not_usuario

		if ($this->RowType == EW_ROWTYPE_VIEW) { // View row

			// not_id
			$this->not_id->ViewValue = $this->not_id->CurrentValue;
			$this->not_id->ViewCustomAttributes = "";

			// not_fecha
			$this->not_fecha->ViewValue = $this->not_fecha->CurrentValue;
			$this->not_fecha->ViewValue = ew_FormatDateTime($this->not_fecha->ViewValue, 7);
			$this->not_fecha->ViewCustomAttributes = "";

			// not_hora
			$this->not_hora->ViewValue = $this->not_hora->CurrentValue;
			$this->not_hora->ViewCustomAttributes = "";

			// not_seccion
			if (strval($this->not_seccion->CurrentValue) <> "") {
				$sFilterWrk = "`sec_id`" . ew_SearchString("=", $this->not_seccion->CurrentValue, EW_DATATYPE_NUMBER);
			$sSqlWrk = "SELECT `sec_id`, `sec_nombre` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `secciones`";
			$sWhereWrk = "";
			if ($sFilterWrk <> "") {
				ew_AddFilter($sWhereWrk, $sFilterWrk);
			}

			// Call Lookup selecting
			$this->Lookup_Selecting($this->not_seccion, $sWhereWrk);
			if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
			$sSqlWrk .= " ORDER BY `sec_nombre` Asc";
				$rswrk = $conn->Execute($sSqlWrk);
				if ($rswrk && !$rswrk->EOF) { // Lookup values found
					$this->not_seccion->ViewValue = $rswrk->fields('DispFld');
					$rswrk->Close();
				} else {
					$this->not_seccion->ViewValue = $this->not_seccion->CurrentValue;
				}
			} else {
				$this->not_seccion->ViewValue = NULL;
			}
			$this->not_seccion->ViewCustomAttributes = "";

			// not_orden
			if (strval($this->not_orden->CurrentValue) <> "") {
				switch ($this->not_orden->CurrentValue) {
					case $this->not_orden->FldTagValue(1):
						$this->not_orden->ViewValue = $this->not_orden->FldTagCaption(1) <> "" ? $this->not_orden->FldTagCaption(1) : $this->not_orden->CurrentValue;
						break;
					case $this->not_orden->FldTagValue(2):
						$this->not_orden->ViewValue = $this->not_orden->FldTagCaption(2) <> "" ? $this->not_orden->FldTagCaption(2) : $this->not_orden->CurrentValue;
						break;
					case $this->not_orden->FldTagValue(3):
						$this->not_orden->ViewValue = $this->not_orden->FldTagCaption(3) <> "" ? $this->not_orden->FldTagCaption(3) : $this->not_orden->CurrentValue;
						break;
					case $this->not_orden->FldTagValue(4):
						$this->not_orden->ViewValue = $this->not_orden->FldTagCaption(4) <> "" ? $this->not_orden->FldTagCaption(4) : $this->not_orden->CurrentValue;
						break;
					case $this->not_orden->FldTagValue(5):
						$this->not_orden->ViewValue = $this->not_orden->FldTagCaption(5) <> "" ? $this->not_orden->FldTagCaption(5) : $this->not_orden->CurrentValue;
						break;
					case $this->not_orden->FldTagValue(6):
						$this->not_orden->ViewValue = $this->not_orden->FldTagCaption(6) <> "" ? $this->not_orden->FldTagCaption(6) : $this->not_orden->CurrentValue;
						break;
					case $this->not_orden->FldTagValue(7):
						$this->not_orden->ViewValue = $this->not_orden->FldTagCaption(7) <> "" ? $this->not_orden->FldTagCaption(7) : $this->not_orden->CurrentValue;
						break;
					case $this->not_orden->FldTagValue(8):
						$this->not_orden->ViewValue = $this->not_orden->FldTagCaption(8) <> "" ? $this->not_orden->FldTagCaption(8) : $this->not_orden->CurrentValue;
						break;
					case $this->not_orden->FldTagValue(9):
						$this->not_orden->ViewValue = $this->not_orden->FldTagCaption(9) <> "" ? $this->not_orden->FldTagCaption(9) : $this->not_orden->CurrentValue;
						break;
					case $this->not_orden->FldTagValue(10):
						$this->not_orden->ViewValue = $this->not_orden->FldTagCaption(10) <> "" ? $this->not_orden->FldTagCaption(10) : $this->not_orden->CurrentValue;
						break;
					case $this->not_orden->FldTagValue(11):
						$this->not_orden->ViewValue = $this->not_orden->FldTagCaption(11) <> "" ? $this->not_orden->FldTagCaption(11) : $this->not_orden->CurrentValue;
						break;
					case $this->not_orden->FldTagValue(12):
						$this->not_orden->ViewValue = $this->not_orden->FldTagCaption(12) <> "" ? $this->not_orden->FldTagCaption(12) : $this->not_orden->CurrentValue;
						break;
					case $this->not_orden->FldTagValue(13):
						$this->not_orden->ViewValue = $this->not_orden->FldTagCaption(13) <> "" ? $this->not_orden->FldTagCaption(13) : $this->not_orden->CurrentValue;
						break;
					default:
						$this->not_orden->ViewValue = $this->not_orden->CurrentValue;
				}
			} else {
				$this->not_orden->ViewValue = NULL;
			}
			$this->not_orden->ViewCustomAttributes = "";

			// not_copete
			$this->not_copete->ViewValue = $this->not_copete->CurrentValue;
			$this->not_copete->ViewCustomAttributes = "";

			// not_titulo
			$this->not_titulo->ViewValue = $this->not_titulo->CurrentValue;
			$this->not_titulo->ViewCustomAttributes = "";

			// not_resumens
			$this->not_resumens->ViewValue = $this->not_resumens->CurrentValue;
			$this->not_resumens->ViewCustomAttributes = "";

			// not_contenido
			$this->not_contenido->ViewValue = $this->not_contenido->CurrentValue;
			$this->not_contenido->ViewCustomAttributes = "";

			// not_imagen
			if (!ew_Empty($this->not_imagen->Upload->DbValue)) {
				$this->not_imagen->ViewValue = $this->not_imagen->Upload->DbValue;
			} else {
				$this->not_imagen->ViewValue = "";
			}
			$this->not_imagen->ViewCustomAttributes = "";

			// not_epi
			$this->not_epi->ViewValue = $this->not_epi->CurrentValue;
			$this->not_epi->ViewCustomAttributes = "";

			// not_audio
			if (!ew_Empty($this->not_audio->Upload->DbValue)) {
				$this->not_audio->ViewValue = $this->not_audio->Upload->DbValue;
			} else {
				$this->not_audio->ViewValue = "";
			}
			$this->not_audio->ViewCustomAttributes = "";

			// not_url
			$this->not_url->ViewValue = $this->not_url->CurrentValue;
			$this->not_url->ViewCustomAttributes = "";

			// not_publicar
			if (strval($this->not_publicar->CurrentValue) <> "") {
				$this->not_publicar->ViewValue = "";
				$arwrk = explode(",", strval($this->not_publicar->CurrentValue));
				$cnt = count($arwrk);
				for ($ari = 0; $ari < $cnt; $ari++) {
					switch (trim($arwrk[$ari])) {
						case $this->not_publicar->FldTagValue(1):
							$this->not_publicar->ViewValue .= $this->not_publicar->FldTagCaption(1) <> "" ? $this->not_publicar->FldTagCaption(1) : trim($arwrk[$ari]);
							break;
						default:
							$this->not_publicar->ViewValue .= trim($arwrk[$ari]);
					}
					if ($ari < $cnt-1) $this->not_publicar->ViewValue .= ew_ViewOptionSeparator($ari);
				}
			} else {
				$this->not_publicar->ViewValue = NULL;
			}
			$this->not_publicar->ViewCustomAttributes = "";

			// not_fuente1
			if (strval($this->not_fuente1->CurrentValue) <> "") {
				$sFilterWrk = "`FuenteId`" . ew_SearchString("=", $this->not_fuente1->CurrentValue, EW_DATATYPE_NUMBER);
			$sSqlWrk = "SELECT `FuenteId`, `FuenteDescripcion` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `fuente`";
			$sWhereWrk = "";
			if ($sFilterWrk <> "") {
				ew_AddFilter($sWhereWrk, $sFilterWrk);
			}

			// Call Lookup selecting
			$this->Lookup_Selecting($this->not_fuente1, $sWhereWrk);
			if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
				$rswrk = $conn->Execute($sSqlWrk);
				if ($rswrk && !$rswrk->EOF) { // Lookup values found
					$this->not_fuente1->ViewValue = $rswrk->fields('DispFld');
					$rswrk->Close();
				} else {
					$this->not_fuente1->ViewValue = $this->not_fuente1->CurrentValue;
				}
			} else {
				$this->not_fuente1->ViewValue = NULL;
			}
			$this->not_fuente1->ViewCustomAttributes = "";

			// not_fuente
			$this->not_fuente->ViewValue = $this->not_fuente->CurrentValue;
			$this->not_fuente->ViewCustomAttributes = "";

			// not_galeria
			if (strval($this->not_galeria->CurrentValue) <> "") {
				$sFilterWrk = "`gal_id`" . ew_SearchString("=", $this->not_galeria->CurrentValue, EW_DATATYPE_NUMBER);
			$sSqlWrk = "SELECT `gal_id`, `gal_des` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `galerias`";
			$sWhereWrk = "";
			if ($sFilterWrk <> "") {
				ew_AddFilter($sWhereWrk, $sFilterWrk);
			}

			// Call Lookup selecting
			$this->Lookup_Selecting($this->not_galeria, $sWhereWrk);
			if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
				$rswrk = $conn->Execute($sSqlWrk);
				if ($rswrk && !$rswrk->EOF) { // Lookup values found
					$this->not_galeria->ViewValue = $rswrk->fields('DispFld');
					$rswrk->Close();
				} else {
					$this->not_galeria->ViewValue = $this->not_galeria->CurrentValue;
				}
			} else {
				$this->not_galeria->ViewValue = NULL;
			}
			$this->not_galeria->ViewCustomAttributes = "";

			// not_destacada
			if (strval($this->not_destacada->CurrentValue) <> "") {
				switch ($this->not_destacada->CurrentValue) {
					case $this->not_destacada->FldTagValue(1):
						$this->not_destacada->ViewValue = $this->not_destacada->FldTagCaption(1) <> "" ? $this->not_destacada->FldTagCaption(1) : $this->not_destacada->CurrentValue;
						break;
					case $this->not_destacada->FldTagValue(2):
						$this->not_destacada->ViewValue = $this->not_destacada->FldTagCaption(2) <> "" ? $this->not_destacada->FldTagCaption(2) : $this->not_destacada->CurrentValue;
						break;
					default:
						$this->not_destacada->ViewValue = $this->not_destacada->CurrentValue;
				}
			} else {
				$this->not_destacada->ViewValue = NULL;
			}
			$this->not_destacada->ViewCustomAttributes = "";

			// not_visitas
			$this->not_visitas->ViewValue = $this->not_visitas->CurrentValue;
			$this->not_visitas->ViewCustomAttributes = "";

			// not_publicar_index
			if (strval($this->not_publicar_index->CurrentValue) <> "") {
				switch ($this->not_publicar_index->CurrentValue) {
					case $this->not_publicar_index->FldTagValue(1):
						$this->not_publicar_index->ViewValue = $this->not_publicar_index->FldTagCaption(1) <> "" ? $this->not_publicar_index->FldTagCaption(1) : $this->not_publicar_index->CurrentValue;
						break;
					case $this->not_publicar_index->FldTagValue(2):
						$this->not_publicar_index->ViewValue = $this->not_publicar_index->FldTagCaption(2) <> "" ? $this->not_publicar_index->FldTagCaption(2) : $this->not_publicar_index->CurrentValue;
						break;
					default:
						$this->not_publicar_index->ViewValue = $this->not_publicar_index->CurrentValue;
				}
			} else {
				$this->not_publicar_index->ViewValue = NULL;
			}
			$this->not_publicar_index->ViewCustomAttributes = "";

			// not_autor
			$this->not_autor->ViewValue = $this->not_autor->CurrentValue;
			$this->not_autor->ViewCustomAttributes = "";

			// not_usuario
			if (strval($this->not_usuario->CurrentValue) <> "") {
				$sFilterWrk = "`usu_id`" . ew_SearchString("=", $this->not_usuario->CurrentValue, EW_DATATYPE_NUMBER);
			$sSqlWrk = "SELECT `usu_id`, `usu_nom` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `usuarios`";
			$sWhereWrk = "";
			if ($sFilterWrk <> "") {
				ew_AddFilter($sWhereWrk, $sFilterWrk);
			}

			// Call Lookup selecting
			$this->Lookup_Selecting($this->not_usuario, $sWhereWrk);
			if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
				$rswrk = $conn->Execute($sSqlWrk);
				if ($rswrk && !$rswrk->EOF) { // Lookup values found
					$this->not_usuario->ViewValue = $rswrk->fields('DispFld');
					$rswrk->Close();
				} else {
					$this->not_usuario->ViewValue = $this->not_usuario->CurrentValue;
				}
			} else {
				$this->not_usuario->ViewValue = NULL;
			}
			$this->not_usuario->ViewCustomAttributes = "";

			// not_id
			$this->not_id->LinkCustomAttributes = "";
			$this->not_id->HrefValue = "";
			$this->not_id->TooltipValue = "";

			// not_fecha
			$this->not_fecha->LinkCustomAttributes = "";
			$this->not_fecha->HrefValue = "";
			$this->not_fecha->TooltipValue = "";

			// not_hora
			$this->not_hora->LinkCustomAttributes = "";
			$this->not_hora->HrefValue = "";
			$this->not_hora->TooltipValue = "";

			// not_seccion
			$this->not_seccion->LinkCustomAttributes = "";
			$this->not_seccion->HrefValue = "";
			$this->not_seccion->TooltipValue = "";

			// not_orden
			$this->not_orden->LinkCustomAttributes = "";
			$this->not_orden->HrefValue = "";
			$this->not_orden->TooltipValue = "";

			// not_copete
			$this->not_copete->LinkCustomAttributes = "";
			$this->not_copete->HrefValue = "";
			$this->not_copete->TooltipValue = "";

			// not_titulo
			$this->not_titulo->LinkCustomAttributes = "";
			$this->not_titulo->HrefValue = "";
			$this->not_titulo->TooltipValue = "";

			// not_resumens
			$this->not_resumens->LinkCustomAttributes = "";
			$this->not_resumens->HrefValue = "";
			$this->not_resumens->TooltipValue = "";

			// not_contenido
			$this->not_contenido->LinkCustomAttributes = "";
			$this->not_contenido->HrefValue = "";
			$this->not_contenido->TooltipValue = "";

			// not_imagen
			$this->not_imagen->LinkCustomAttributes = "";
			$this->not_imagen->HrefValue = "";
			$this->not_imagen->HrefValue2 = $this->not_imagen->UploadPath . $this->not_imagen->Upload->DbValue;
			$this->not_imagen->TooltipValue = "";

			// not_epi
			$this->not_epi->LinkCustomAttributes = "";
			$this->not_epi->HrefValue = "";
			$this->not_epi->TooltipValue = "";

			// not_audio
			$this->not_audio->LinkCustomAttributes = "";
			$this->not_audio->HrefValue = "";
			$this->not_audio->HrefValue2 = $this->not_audio->UploadPath . $this->not_audio->Upload->DbValue;
			$this->not_audio->TooltipValue = "";

			// not_url
			$this->not_url->LinkCustomAttributes = "";
			$this->not_url->HrefValue = "";
			$this->not_url->TooltipValue = "";

			// not_publicar
			$this->not_publicar->LinkCustomAttributes = "";
			$this->not_publicar->HrefValue = "";
			$this->not_publicar->TooltipValue = "";

			// not_fuente1
			$this->not_fuente1->LinkCustomAttributes = "";
			$this->not_fuente1->HrefValue = "";
			$this->not_fuente1->TooltipValue = "";

			// not_galeria
			$this->not_galeria->LinkCustomAttributes = "";
			$this->not_galeria->HrefValue = "";
			$this->not_galeria->TooltipValue = "";

			// not_destacada
			$this->not_destacada->LinkCustomAttributes = "";
			$this->not_destacada->HrefValue = "";
			$this->not_destacada->TooltipValue = "";

			// not_visitas
			$this->not_visitas->LinkCustomAttributes = "";
			$this->not_visitas->HrefValue = "";
			$this->not_visitas->TooltipValue = "";

			// not_publicar_index
			$this->not_publicar_index->LinkCustomAttributes = "";
			$this->not_publicar_index->HrefValue = "";
			$this->not_publicar_index->TooltipValue = "";

			// not_usuario
			$this->not_usuario->LinkCustomAttributes = "";
			$this->not_usuario->HrefValue = "";
			$this->not_usuario->TooltipValue = "";
		}

		// Call Row Rendered event
		if ($this->RowType <> EW_ROWTYPE_AGGREGATEINIT)
			$this->Row_Rendered();
	}

	// Set up Breadcrumb
	function SetupBreadcrumb() {
		global $Breadcrumb, $Language;
		$Breadcrumb = new cBreadcrumb();
		$Breadcrumb->Add("list", $this->TableVar, "noticiaslist.php", $this->TableVar, TRUE);
		$PageId = "view";
		$Breadcrumb->Add("view", $PageId, ew_CurrentUrl());
	}

	// Page Load event
	function Page_Load() {

		//echo "Page Load";
	}

	// Page Unload event
	function Page_Unload() {

		//echo "Page Unload";
	}

	// Page Redirecting event
	function Page_Redirecting(&$url) {

		// Example:
		//$url = "your URL";

	}

	// Message Showing event
	// $type = ''|'success'|'failure'|'warning'
	function Message_Showing(&$msg, $type) {
		if ($type == 'success') {

			//$msg = "your success message";
		} elseif ($type == 'failure') {

			//$msg = "your failure message";
		} elseif ($type == 'warning') {

			//$msg = "your warning message";
		} else {

			//$msg = "your message";
		}
	}

	// Page Render event
	function Page_Render() {

		//echo "Page Render";
	}

	// Page Data Rendering event
	function Page_DataRendering(&$header) {

		// Example:
		//$header = "your header";

	}

	// Page Data Rendered event
	function Page_DataRendered(&$footer) {

		// Example:
		//$footer = "your footer";

	}
}
?>
<?php ew_Header(FALSE) ?>
<?php

// Create page object
if (!isset($noticias_view)) $noticias_view = new cnoticias_view();

// Page init
$noticias_view->Page_Init();

// Page main
$noticias_view->Page_Main();

// Global Page Rendering event (in userfn*.php)
Page_Rendering();

// Page Rendering event
$noticias_view->Page_Render();
?>
<?php include_once "header.php" ?>
<script type="text/javascript">

// Page object
var noticias_view = new ew_Page("noticias_view");
noticias_view.PageID = "view"; // Page ID
var EW_PAGE_ID = noticias_view.PageID; // For backward compatibility

// Form object
var fnoticiasview = new ew_Form("fnoticiasview");

// Form_CustomValidate event
fnoticiasview.Form_CustomValidate = 
 function(fobj) { // DO NOT CHANGE THIS LINE!

 	// Your custom validation code here, return false if invalid. 
 	return true;
 }

// Use JavaScript validation or not
<?php if (EW_CLIENT_VALIDATE) { ?>
fnoticiasview.ValidateRequired = true;
<?php } else { ?>
fnoticiasview.ValidateRequired = false; 
<?php } ?>

// Dynamic selection lists
fnoticiasview.Lists["x_not_seccion"] = {"LinkField":"x_sec_id","Ajax":true,"AutoFill":false,"DisplayFields":["x_sec_nombre","","",""],"ParentFields":[],"FilterFields":[],"Options":[]};
fnoticiasview.Lists["x_not_fuente1"] = {"LinkField":"x_FuenteId","Ajax":null,"AutoFill":false,"DisplayFields":["x_FuenteDescripcion","","",""],"ParentFields":[],"FilterFields":[],"Options":[]};
fnoticiasview.Lists["x_not_galeria"] = {"LinkField":"x_gal_id","Ajax":true,"AutoFill":false,"DisplayFields":["x_gal_des","","",""],"ParentFields":[],"FilterFields":[],"Options":[]};
fnoticiasview.Lists["x_not_usuario"] = {"LinkField":"x_usu_id","Ajax":null,"AutoFill":false,"DisplayFields":["x_usu_nom","","",""],"ParentFields":[],"FilterFields":[],"Options":[]};

// Form object for search
</script>
<script type="text/javascript">

// Write your client script here, no need to add script tags.
</script>
<?php $Breadcrumb->Render(); ?>
<div class="ewViewExportOptions">
<?php $noticias_view->ExportOptions->Render("body") ?>
<?php if (!$noticias_view->ExportOptions->UseDropDownButton) { ?>
</div>
<div class="ewViewOtherOptions">
<?php } ?>
<?php
	foreach ($noticias_view->OtherOptions as &$option)
		$option->Render("body");
?>
</div>
<?php $noticias_view->ShowPageHeader(); ?>
<?php
$noticias_view->ShowMessage();
?>
<form name="fnoticiasview" id="fnoticiasview" class="ewForm form-horizontal" action="<?php echo ew_CurrentPage() ?>" method="post">
<input type="hidden" name="t" value="noticias">
<table class="ewGrid"><tr><td>
<table id="tbl_noticiasview" class="table table-bordered table-striped">
<?php if ($noticias->not_id->Visible) { // not_id ?>
	<tr id="r_not_id">
		<td><span id="elh_noticias_not_id"><?php echo $noticias->not_id->FldCaption() ?></span></td>
		<td<?php echo $noticias->not_id->CellAttributes() ?>>
<span id="el_noticias_not_id" class="control-group">
<span<?php echo $noticias->not_id->ViewAttributes() ?>>
<?php echo $noticias->not_id->ViewValue ?></span>
</span>
</td>
	</tr>
<?php } ?>
<?php if ($noticias->not_fecha->Visible) { // not_fecha ?>
	<tr id="r_not_fecha">
		<td><span id="elh_noticias_not_fecha"><?php echo $noticias->not_fecha->FldCaption() ?></span></td>
		<td<?php echo $noticias->not_fecha->CellAttributes() ?>>
<span id="el_noticias_not_fecha" class="control-group">
<span<?php echo $noticias->not_fecha->ViewAttributes() ?>>
<?php echo $noticias->not_fecha->ViewValue ?></span>
</span>
</td>
	</tr>
<?php } ?>
<?php if ($noticias->not_hora->Visible) { // not_hora ?>
	<tr id="r_not_hora">
		<td><span id="elh_noticias_not_hora"><?php echo $noticias->not_hora->FldCaption() ?></span></td>
		<td<?php echo $noticias->not_hora->CellAttributes() ?>>
<span id="el_noticias_not_hora" class="control-group">
<span<?php echo $noticias->not_hora->ViewAttributes() ?>>
<?php echo $noticias->not_hora->ViewValue ?></span>
</span>
</td>
	</tr>
<?php } ?>
<?php if ($noticias->not_seccion->Visible) { // not_seccion ?>
	<tr id="r_not_seccion">
		<td><span id="elh_noticias_not_seccion"><?php echo $noticias->not_seccion->FldCaption() ?></span></td>
		<td<?php echo $noticias->not_seccion->CellAttributes() ?>>
<span id="el_noticias_not_seccion" class="control-group">
<span<?php echo $noticias->not_seccion->ViewAttributes() ?>>
<?php echo $noticias->not_seccion->ViewValue ?></span>
</span>
</td>
	</tr>
<?php } ?>
<?php if ($noticias->not_orden->Visible) { // not_orden ?>
	<tr id="r_not_orden">
		<td><span id="elh_noticias_not_orden"><?php echo $noticias->not_orden->FldCaption() ?></span></td>
		<td<?php echo $noticias->not_orden->CellAttributes() ?>>
<span id="el_noticias_not_orden" class="control-group">
<span<?php echo $noticias->not_orden->ViewAttributes() ?>>
<?php echo $noticias->not_orden->ViewValue ?></span>
</span>
</td>
	</tr>
<?php } ?>
<?php if ($noticias->not_copete->Visible) { // not_copete ?>
	<tr id="r_not_copete">
		<td><span id="elh_noticias_not_copete"><?php echo $noticias->not_copete->FldCaption() ?></span></td>
		<td<?php echo $noticias->not_copete->CellAttributes() ?>>
<span id="el_noticias_not_copete" class="control-group">
<span<?php echo $noticias->not_copete->ViewAttributes() ?>>
<?php echo $noticias->not_copete->ViewValue ?></span>
</span>
</td>
	</tr>
<?php } ?>
<?php if ($noticias->not_titulo->Visible) { // not_titulo ?>
	<tr id="r_not_titulo">
		<td><span id="elh_noticias_not_titulo"><?php echo $noticias->not_titulo->FldCaption() ?></span></td>
		<td<?php echo $noticias->not_titulo->CellAttributes() ?>>
<span id="el_noticias_not_titulo" class="control-group">
<span<?php echo $noticias->not_titulo->ViewAttributes() ?>>
<?php echo $noticias->not_titulo->ViewValue ?></span>
</span>
</td>
	</tr>
<?php } ?>
<?php if ($noticias->not_resumens->Visible) { // not_resumens ?>
	<tr id="r_not_resumens">
		<td><span id="elh_noticias_not_resumens"><?php echo $noticias->not_resumens->FldCaption() ?></span></td>
		<td<?php echo $noticias->not_resumens->CellAttributes() ?>>
<span id="el_noticias_not_resumens" class="control-group">
<span<?php echo $noticias->not_resumens->ViewAttributes() ?>>
<?php echo $noticias->not_resumens->ViewValue ?></span>
</span>
</td>
	</tr>
<?php } ?>
<?php if ($noticias->not_contenido->Visible) { // not_contenido ?>
	<tr id="r_not_contenido">
		<td><span id="elh_noticias_not_contenido"><?php echo $noticias->not_contenido->FldCaption() ?></span></td>
		<td<?php echo $noticias->not_contenido->CellAttributes() ?>>
<span id="el_noticias_not_contenido" class="control-group">
<span<?php echo $noticias->not_contenido->ViewAttributes() ?>>
<?php echo $noticias->not_contenido->ViewValue ?></span>
</span>
</td>
	</tr>
<?php } ?>
<?php if ($noticias->not_imagen->Visible) { // not_imagen ?>
	<tr id="r_not_imagen">
		<td><span id="elh_noticias_not_imagen"><?php echo $noticias->not_imagen->FldCaption() ?></span></td>
		<td<?php echo $noticias->not_imagen->CellAttributes() ?>>
<span id="el_noticias_not_imagen" class="control-group">
<span<?php echo $noticias->not_imagen->ViewAttributes() ?>>
<?php if ($noticias->not_imagen->LinkAttributes() <> "") { ?>
<?php if (!empty($noticias->not_imagen->Upload->DbValue)) { ?>
<?php echo $noticias->not_imagen->ViewValue ?>
<?php } elseif (!in_array($noticias->CurrentAction, array("I", "edit", "gridedit"))) { ?>	
&nbsp;
<?php } ?>
<?php } else { ?>
<?php if (!empty($noticias->not_imagen->Upload->DbValue)) { ?>
<?php echo $noticias->not_imagen->ViewValue ?>
<?php } elseif (!in_array($noticias->CurrentAction, array("I", "edit", "gridedit"))) { ?>	
&nbsp;
<?php } ?>
<?php } ?>
</span>
</span>
</td>
	</tr>
<?php } ?>
<?php if ($noticias->not_epi->Visible) { // not_epi ?>
	<tr id="r_not_epi">
		<td><span id="elh_noticias_not_epi"><?php echo $noticias->not_epi->FldCaption() ?></span></td>
		<td<?php echo $noticias->not_epi->CellAttributes() ?>>
<span id="el_noticias_not_epi" class="control-group">
<span<?php echo $noticias->not_epi->ViewAttributes() ?>>
<?php echo $noticias->not_epi->ViewValue ?></span>
</span>
</td>
	</tr>
<?php } ?>
<?php if ($noticias->not_audio->Visible) { // not_audio ?>
	<tr id="r_not_audio">
		<td><span id="elh_noticias_not_audio"><?php echo $noticias->not_audio->FldCaption() ?></span></td>
		<td<?php echo $noticias->not_audio->CellAttributes() ?>>
<span id="el_noticias_not_audio" class="control-group">
<span<?php echo $noticias->not_audio->ViewAttributes() ?>>
<?php if ($noticias->not_audio->LinkAttributes() <> "") { ?>
<?php if (!empty($noticias->not_audio->Upload->DbValue)) { ?>
<?php echo $noticias->not_audio->ViewValue ?>
<?php } elseif (!in_array($noticias->CurrentAction, array("I", "edit", "gridedit"))) { ?>	
&nbsp;
<?php } ?>
<?php } else { ?>
<?php if (!empty($noticias->not_audio->Upload->DbValue)) { ?>
<?php echo $noticias->not_audio->ViewValue ?>
<?php } elseif (!in_array($noticias->CurrentAction, array("I", "edit", "gridedit"))) { ?>	
&nbsp;
<?php } ?>
<?php } ?>
</span>
</span>
</td>
	</tr>
<?php } ?>
<?php if ($noticias->not_url->Visible) { // not_url ?>
	<tr id="r_not_url">
		<td><span id="elh_noticias_not_url"><?php echo $noticias->not_url->FldCaption() ?></span></td>
		<td<?php echo $noticias->not_url->CellAttributes() ?>>
<span id="el_noticias_not_url" class="control-group">
<span<?php echo $noticias->not_url->ViewAttributes() ?>>
<?php echo $noticias->not_url->ViewValue ?></span>
</span>
</td>
	</tr>
<?php } ?>
<?php if ($noticias->not_publicar->Visible) { // not_publicar ?>
	<tr id="r_not_publicar">
		<td><span id="elh_noticias_not_publicar"><?php echo $noticias->not_publicar->FldCaption() ?></span></td>
		<td<?php echo $noticias->not_publicar->CellAttributes() ?>>
<span id="el_noticias_not_publicar" class="control-group">
<span<?php echo $noticias->not_publicar->ViewAttributes() ?>>
<?php echo $noticias->not_publicar->ViewValue ?></span>
</span>
</td>
	</tr>
<?php } ?>
<?php if ($noticias->not_fuente1->Visible) { // not_fuente1 ?>
	<tr id="r_not_fuente1">
		<td><span id="elh_noticias_not_fuente1"><?php echo $noticias->not_fuente1->FldCaption() ?></span></td>
		<td<?php echo $noticias->not_fuente1->CellAttributes() ?>>
<span id="el_noticias_not_fuente1" class="control-group">
<span<?php echo $noticias->not_fuente1->ViewAttributes() ?>>
<?php echo $noticias->not_fuente1->ViewValue ?></span>
</span>
</td>
	</tr>
<?php } ?>
<?php if ($noticias->not_galeria->Visible) { // not_galeria ?>
	<tr id="r_not_galeria">
		<td><span id="elh_noticias_not_galeria"><?php echo $noticias->not_galeria->FldCaption() ?></span></td>
		<td<?php echo $noticias->not_galeria->CellAttributes() ?>>
<span id="el_noticias_not_galeria" class="control-group">
<span<?php echo $noticias->not_galeria->ViewAttributes() ?>>
<?php echo $noticias->not_galeria->ViewValue ?></span>
</span>
</td>
	</tr>
<?php } ?>
<?php if ($noticias->not_destacada->Visible) { // not_destacada ?>
	<tr id="r_not_destacada">
		<td><span id="elh_noticias_not_destacada"><?php echo $noticias->not_destacada->FldCaption() ?></span></td>
		<td<?php echo $noticias->not_destacada->CellAttributes() ?>>
<span id="el_noticias_not_destacada" class="control-group">
<span<?php echo $noticias->not_destacada->ViewAttributes() ?>>
<?php echo $noticias->not_destacada->ViewValue ?></span>
</span>
</td>
	</tr>
<?php } ?>
<?php if ($noticias->not_visitas->Visible) { // not_visitas ?>
	<tr id="r_not_visitas">
		<td><span id="elh_noticias_not_visitas"><?php echo $noticias->not_visitas->FldCaption() ?></span></td>
		<td<?php echo $noticias->not_visitas->CellAttributes() ?>>
<span id="el_noticias_not_visitas" class="control-group">
<span<?php echo $noticias->not_visitas->ViewAttributes() ?>>
<?php echo $noticias->not_visitas->ViewValue ?></span>
</span>
</td>
	</tr>
<?php } ?>
<?php if ($noticias->not_publicar_index->Visible) { // not_publicar_index ?>
	<tr id="r_not_publicar_index">
		<td><span id="elh_noticias_not_publicar_index"><?php echo $noticias->not_publicar_index->FldCaption() ?></span></td>
		<td<?php echo $noticias->not_publicar_index->CellAttributes() ?>>
<span id="el_noticias_not_publicar_index" class="control-group">
<span<?php echo $noticias->not_publicar_index->ViewAttributes() ?>>
<?php echo $noticias->not_publicar_index->ViewValue ?></span>
</span>
</td>
	</tr>
<?php } ?>
<?php if ($noticias->not_usuario->Visible) { // not_usuario ?>
	<tr id="r_not_usuario">
		<td><span id="elh_noticias_not_usuario"><?php echo $noticias->not_usuario->FldCaption() ?></span></td>
		<td<?php echo $noticias->not_usuario->CellAttributes() ?>>
<span id="el_noticias_not_usuario" class="control-group">
<span<?php echo $noticias->not_usuario->ViewAttributes() ?>>
<?php echo $noticias->not_usuario->ViewValue ?></span>
</span>
</td>
	</tr>
<?php } ?>
</table>
</td></tr></table>
</form>
<script type="text/javascript">
fnoticiasview.Init();
</script>
<?php
$noticias_view->ShowPageFooter();
if (EW_DEBUG_ENABLED)
	echo ew_DebugMsg();
?>
<script type="text/javascript">

// Write your table-specific startup script here
// document.write("page loaded");

</script>
<?php include_once "footer.php" ?>
<?php
$noticias_view->Page_Terminate();
?>
